package com.lhh.springcloud.service.imp;

import com.lhh.springcloud.dao.StorageMapper;
import com.lhh.springcloud.service.StorageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author 李洪豪
 * @Sno 20220301044
 */
@Service
@Slf4j
public class StorageServiceImp implements StorageService {
    @Resource
    private StorageMapper storageMapper;
    @Override
    public void updateStorage(Long product_id, Integer nums) {
        log.info("============seata_storage_micro_service-10010库存扣减开始,库存数为" + nums);
        storageMapper.updateStorage(product_id,nums);
        log.info("============seata_storage_micro_service-10010库存扣减结束,库存数为" + nums);
    }
}
